package interview;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class iterator {
    public static void main(String[] args) {
        //iterator删除元素
        System.out.println((11 + 3 * 8) / 4 % 3);
        List<String> list = new ArrayList<>();
        list.add("a");
        list.add("b");
        list.add("c");
        Iterator<String> it = list.iterator();
        while(it.hasNext()){
            String e = it.next();
            if("b".equals(e)){
                it.remove();
            }
        }
        System.out.println(list);
    }
}
